package com.slz3.business.module.socialManagement.socSign.steward;

import com.slz3.business.module.socialManagement.socSign.domain.SocSign;
import com.slz3.business.module.socialManagement.socSign.domain.SocSignCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;

@Component
public class SocSignResponse {

    @Resource
    private  SocSignResController socSignResController;

    public  Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(SocSign.class).flatMap(socSign ->
                socSignResController.add(req, socSign)
        );
    }

    public  Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(SocSignCondition.class).flatMap(socSignCondition ->
                socSignResController.delete(req, socSignCondition)
        );
    }

    public  Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(SocSign.class).flatMap(socSign ->
                socSignResController.modify(req, socSign)
        );
    }


    public  Mono<ServerResponse> list(ServerRequest req) {
        return socSignResController.list(req);
    }

    public  Mono<ServerResponse> info(ServerRequest req) {
        return socSignResController.info(req);
    }

    public  Mono<ServerResponse> choice(ServerRequest req) {
        return socSignResController.choice(req);
    }

    public  Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(SocSignCondition.class).flatMap(socSignCondition ->
                socSignResController.auditSubmit(req, socSignCondition)
        );
    }

    public  Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(SocSignCondition.class).flatMap(socSignCondition ->
                socSignResController.audit(req, socSignCondition)
        );
    }

    public  Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(SocSignCondition.class).flatMap(socSignCondition ->
                socSignResController.auditReject(req, socSignCondition)
        );
    }

    public  Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(SocSignCondition.class).flatMap(socSignCondition ->
                socSignResController.usingEnable(req, socSignCondition)
        );
    }

    public  Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(SocSignCondition.class).flatMap(socSignCondition ->
                socSignResController.usingDisable(req, socSignCondition)
        );
    }   

}
